@extends('layouts.main')

@section('content')
<div class="card-header">
    <a href="{{ route('users.create') }}" class="btn btn-primary">Добавить</a>
    <table id="example" class="table table-striped table-bordered" style="width:100%">
        <thead>
            <tr>
                <th>ID</th>
                <th>Имя</th>
                <th>Фамилия</th>
                <th>Отчество</th>
                <th>Email</th>
                <th>Возраст</th>
                <th>Пол</th>
                <th>Адресс</th>
            </tr>
        </thead>
        <tbody>
        @foreach ($users as $user)
            <tr>
                <td>{{ $user->id }}</td>
                <td><a href="{{route('users.show', $user->id )}}">{{$user->name}}</a></td>
                <td>{{$user->surname}}</td>
                <td>{{$user->patronimic}}</td>
                <td>{{$user->email}}</td>
                <td>{{$user->age}}</td>
                <td>{{$user->GenderTitle}}</td>
                <td>{{$user->address}}</td>
                @endforeach
            </tr>
            
        </tbody>
</div>

@endsection